using System;
using System.Collections.Generic;
using Next.Whs.MQ;
namespace MqView {
	static class Program {
		static void Main() {
			QueueManager qm=new QueueManager();
			Queue q=null;
			//string _queue="DEV.XP.PZIAREK";
			string _queue="WHS.SOFA.NWMS.TRANS";
			//bool connected=qm.Connect("NTD+WH01","CLIENTS.NTDWH01.00","pon-wdmq01-mq(1390)");
			bool connected=qm.Connect("NTPWH01","CLIENTS.NTPWH01.00","PON-WPMQ01-MQ(1414)");
			q=qm.OpenQueue(_queue,Next.Whs.MQ.QueueManager.OpenOptions.ReadWrite);

			string get=q.Get(3000000);
			//bool put=q.Put("Test MQ Message from method: PutSingleMessageOntoQueue "+DateTime.Now);
			//if(put)
			//{
			//  Console.WriteLine("Message successfully put onto Queue \""+_queue+"\"!");
			//}
			//else
			//{
				//Console.WriteLine("NOT able to PUT Message onto Queue \""+_queue+"\"! ");
			//}
			q.Close();
			bool disc=qm.Disconnect();
			string lastError=qm.LastError;
		}
	}
}